import Vue from "vue";
import Vuex from "vuex"; // 导入vuex

Vue.use(Vuex); // 实际执行 Vuex.install(Vue)
//全局对象
const store = new Vuex.Store({
  // strict:false,
  strict: process.env.NODE_ENV === "development",
  state() {
    return {
      title: "hello vuex",
    };
  },
  mutations: {
    SET_TITLE: (state, v) => (state.title = v),
  },
  getters: {},
  modules: {},
});

export default store;
